﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Welcom1 : System.Web.UI.Page
{
    public int partID;
    public int posiID;
    protected void Page_Load(object sender, EventArgs e)
    {
        //partID = int.Parse(Request.QueryString["departID"].ToString());
        //posiID = int.Parse(Request.QueryString["positionID"].ToString());
        //partID = int.Parse(Session["departID"].ToString());
        //posiID = int.Parse(Session["positionID"].ToString());
        //changePage(partID,posiID);

    }
    protected void Ibtn_Emanage_Click(object sender, ImageClickEventArgs e)
    {
        //Response.Redirect("EManage.aspx?departID=" + partID + "&positionID=" + posiID + "");
        Response.Redirect("EManage.aspx");
    }

    /// <summary>
    ///  根据职位不同显示不同页面
    /// </summary>
    /// <param name="PartmentID">所在部门ID</param>
    /// <param name="PositionID">职位ID，-1代表管理员</param>
    private void changePage(int PartmentID,int PositionID)
    {
        //if (PartmentID == 2 || PositionID == -1)
            //return;
        if (PositionID == -1)
            return;
        /*if (PartmentID == 2)
        {
            Pannel3.Visible = false;
            return;
        }*/

        switch (PositionID)
        {
            case 1:
                //Ibtn_Dmanage.Visible = false;
                Pannel3.Visible = false;
                break;
            case 2:
                //Ibtn_Dmanage.Visible = false;
                Pannel2.Visible = false;
                break;
            case 3:
                //Ibtn_Emanage.Visible = false;
                //Ibtn_Dmanage.Visible = false;
                Pannel1.Visible = false;
                Pannel2.Visible = false;
                break;
        }
    }
}